package cn.autumnorange.service;

import cn.autumnorange.dto.*;
import cn.autumnorange.entity.OrderEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * @InterfaceName OrderService
 * @Description
 * @Date 2019/1/11 18:10
 * @Version 1.0
 */
public interface OrderService {

    /**
     * 创建订单
     *
     * @Param [createOrderDTO]
     * @return cn.autumnorange.dto.CreateOrderDTO
     */
    CreateOrderDTO createOrder(CreateOrderDTO createOrderDTO);

    /**
     * 编辑订单
     *
     * @Param [editOrderDTO]
     * @return cn.autumnorange.dto.EditOrderDTO
     */
    EditOrderDTO editOrder(EditOrderDTO editOrderDTO);

    /**
     * 删除订单
     *
     * @Param [orderId]
     * @return boolean
     */
    boolean deleteOrder(String orderId);

    /**
     * 审核订单
     *
     * @Param [orderStatus]
     * @return cn.autumnorange.dto.AuditOrderDTO
     */
    AuditOrderDTO auditOrder(String orderId, int orderStatus);

    /**
     * 发货
     *
     * @Param [deliveryStatus]
     * @return cn.autumnorange.dto.DeliverGoodsDTO
     */
    DeliverGoodsDTO deliverGoods(String orderId, int deliveryStatus);

    /**
     * 填写快递单号
     *
     * @Param [courierNumber]
     * @return cn.autumnorange.dto.CourierNumberDTO
     */
    CourierNumberDTO courierNumber(String orderId, String courierNumber);

    /**
     * 订单详情
     *
     * @Param [orderId]
     * @return cn.autumnorange.dto.OrderDTO
     */
    OrderDTO orderdetail(String orderId);

    /**
     * 订单列表
     *
     * @Param [pageable]
     * @return org.springframework.data.domain.Page<cn.autumnorange.entity.OrderEntity>
     */
    Page<OrderEntity> orderList(Pageable pageable);

    /**
     * 搜索订单
     *
     * @Param [buyerPhone, pageable]
     * @return org.springframework.data.domain.Page<cn.autumnorange.entity.OrderEntity>
     */
    Page<OrderEntity> findOrder(String buyerPhone, Pageable pageable);

    /**
     * 审核订单列表
     *
     * @Param [orderStatus, pageable]
     * @return org.springframework.data.domain.Page<cn.autumnorange.entity.OrderEntity>
     */
    Page<OrderEntity> auditOrderList(int orderStatus, Pageable pageable);

    /**
     * 订单发货列表
     *
     * @Param [deliveryStatus, pageable]
     * @return org.springframework.data.domain.Page<cn.autumnorange.entity.OrderEntity>
     */
    Page<OrderEntity> deliveryOrderList(int deliveryStatus, int orderStatus, Pageable pageable);
}
